package org.tong.account.service;

import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.tong.account.jpa.AccountTccDaoI;
import org.tong.account.jpa.daos.AccountTccDao;

/**
 * @author
 * @date 2022-12-21 17:56
 */
@Service
public class AccountTccService {

    @Autowired
    private AccountTccDaoI accountTccDao;


    @GlobalTransactional
    public void addAmount(Long id, Long amount) {
        accountTccDao.prepare(null, id, amount);
    }
}
